using System;
using System.Collections.Generic;
using System.Text;

namespace OOFluidFramework.Utility
{    
    public class Vector2
    {
        public double x;
        public double y;
        private static const double EPSLION = 1e-10;

        public Vector2(double x, double y)
        {
            this.x = x;
            this.y = y;
        }
        public Vector2(Vector2 copy)
        {
            this.x = copy.x;
            this.y = copy.y;
        }
        public static Vector2 operator +(Vector2 c1, Vector2 c2)
        {
            return new Vector2(c1.x + c2.x, c1.y + c2.y);
        }
        public static Vector2 operator -(Vector2 c1, Vector2 c2)
        {
            return new Vector2(c1.x - c2.x, c1.y - c2.y);
        }
        public static Vector2 operator *(double c1, Vector2 c2)
        {
            return new Vector2(c2.x * c1, c2.y * c1);
        }
        public static Vector2 operator *(Vector2 c1, double c2)
        {
            return new Vector2(c1.x * c2, c1.y * c2);
        }
        public static Vector2 operator /(Vector2 c1, double c2)
        {
            return new Vector2(c1.x / c2, c1.y / c2);
        }
        public override string ToString()
        {
            return String.Format("<Vector2:({0},{1})>",x,y);
        }
    }
}

